package Factory.SimpleFactory;

public class Factory {
    public Fruit CreateFruit(String fruitName)
    {
        if(fruitName.equalsIgnoreCase("Apple"))
        {
            return new Apple();
        }
        else if(fruitName.equalsIgnoreCase("Banana"))
        {
            return new Banana();
        }
        else if(fruitName.equalsIgnoreCase("Orange"))
        {
            return new Orange();
        }
        return null;
    }
}
